async function downloadImages(url) {
    // 去掉 Puppeteer 相关代码，直接在当前页面执行
    const imageUrls = await (async () => {
        const wrapper__bd = document.getElementsByClassName('wrapper__bd')[2];
        if (!wrapper__bd) return [];

        const ulElements = wrapper__bd.getElementsByTagName('ul');
        let allImageUrls = [];

        for (let ul of ulElements) {
            const liElements = ul.getElementsByTagName('li');
            for (let li of liElements) {
                const dataSrc = li.getAttribute('data-src');
                if (dataSrc) {
                    allImageUrls.push(dataSrc);
                }
            }
        }

        return allImageUrls;
    })();

    // 去掉 Node.js 相关依赖，使用浏览器原生方法下载图片
    imageUrls.forEach((url) => {
        const a = document.createElement('a');
        a.href = url;
        a.download = url.split('/').pop();
        a.click();
    });
}

// 使用示例
// downloadImages('https://example.com');